import axiosHttp from "../../http"

//首页数据查询
async function listData(data) {
  console.log(data)
  return axiosHttp({
    url: "/list/getlistdata",
    method: "get",
    data,
  }).then((res) => {
    return res
  })
}

//点击数据显示数据查询
async function itemListData(data) {
  console.log(data)
  return axiosHttp({
    url: "/list/getitemdata",
    method: "post",
    data,
  }).then((res) => {
    return res
  })
}

//首页数据查询
async function getInit(data) {
  console.log(data)
  return axiosHttp({
    url: "/list/getinit",
    method: "get",
    data,
  }).then((res) => {
    return res
  })
}

async function shopDetails(data) {
  console.log(data)
  return axiosHttp({
    url: "/list/shoplistdetails",
    method: "post",
    data,
  }).then((res) => {
    return res
  })
}

export default {
  listData,
  getInit,
  itemListData,
  shopDetails,
}
